﻿using System.Threading.Tasks;

namespace Sidvall.SystemEnvironment
{
    public class PackageManager
    {
        #region Public Members

        public Sidvall.SystemEnvironment.IPackage Package { get; set; }

        #region GetInstalledDateAsync

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
        public async Task<System.DateTime> GetInstalledDateAsync()
        {
            return await this.Package.GetInstalledDateAsync().ConfigureAwait(false);
        }

        #endregion
        #region GetVersionAsync

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
        public async Task<string> GetVersionAsync()
        {
            return await this.Package.GetVersionAsync().ConfigureAwait(false);
        }

        #endregion
        #region ToString

        public override string ToString()
        {
            return "PackageManager - Sidvall.SystemEnvironment.IPackage";
        }

        #endregion

        #endregion
        #region Constructors

        public PackageManager(Sidvall.SystemEnvironment.IPackage package)
        {
            this.Package = package;
        }

        #endregion
    }
}
